<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style>
.td_item {
    height:30px; 
    line-height: 30px; 
    width: 100%;   
    vertical-align: middle; 
    margin:0px; 
    padding:0px 0px 0px 0px; 
    overflow: hidden;
    border-top:solid 1px #b7d1e6;
}

.td_item2 {
	height: 30px;
	line-height: 30px;
	width: 100%;
	vertical-align: middle;
	margin: 0px;
	padding: 0px 0px 0px 0px;
	overflow: hidden;
	
}

.checkboxWidth {
	width: 200px;
}

.td_item_span {
	display: block;
	text-align: center;
	width: 71% !important;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code">
	<x:out select="$xmlData/data/proposal/grant_code" />
</c:set>
<c:set var="sub_grant_code">
	<x:out select="$xmlData/data/proposal/sub_grant_code" />
</c:set>
<c:set var="nature_value">
	<x:out
		select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
</c:set>

<c:if test="${grant_code==635}">
	<!-- 635国家基础科学人才培养基金 -->
	<c:set var="Class">class="gray" </c:set>
</c:if>

<div class="t_bar">单位财务情况（单位：万元）</div>
<table width="100%" border="0" cellpadding="0" cellspacing="1"
	id="finances" class="t_css">
	<tr class="t_tr">
		<td align="center" width="40%" >指标</td>
		<td align="center" width="60%">上年度（${year-1 }）年</td>
	</tr>
	
	
	
	
	<!-- 企业财务 -->
	<c:set var="finance_items"
		value="&nbsp;&nbsp;主营收入,&nbsp;&nbsp;主营业务支出,&nbsp;&nbsp;主营业务利润,&nbsp;&nbsp;利润总额,&nbsp;&nbsp;净利润,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，营业税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，企业所得税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，个人所得税,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中，其他税,&nbsp;&nbsp;年末资产总额,&nbsp;&nbsp;年末固定资产净值,&nbsp;&nbsp;年末负债总额,&nbsp;&nbsp;年末资产负债率（%）,&nbsp;&nbsp;总现金流量净额,&nbsp;&nbsp;经营活动现金流量净额"
		scope="page"></c:set>
	
			<tr class="li_1" id="finance_enterprise" >
        	<td style="padding:0px">
        		<c:forEach items="${fn:split(finance_items, ',') }" var="item" varStatus="sta">
        			<div class="td_item" <c:if test="${sta.index%2!=0 }">style="background:#f1f1f1;"</c:if>>${item }</div>
        		</c:forEach>
        	</td>
        	
			<x:forEach select="$xmlData/data/organization/finances/finance" var="finance" >
			<c:set var="sequence_no"><x:out select="$finance/@sequence_no" /></c:set>
				<c:if test="${sequence_no==5 }">
	        	<td style="border-left: 1px solid #FFF;">
	        		<div class="td_item" align="center" id="td_item_${index}_1"><x:out select="$finance/income_main" /></div>
					<div class="td_item" align="center" id="td_item_${index}_2"><x:out select="$xmlData/data/proposal/income_main_zc" /></div>
					<div class="td_item" align="center" id="td_item_${index}_3"><x:out select="$finance/proft_main" /></div>
					<div class="td_item" align="center" id="td_item_${index}_4"><x:out select="$finance/proft_total" /></div>
					<div class="td_item" align="center" id="td_item_${index}_5"><x:out select="$finance/proft" /></div>
					<div class="td_item" align="center" id="td_item_${index}_6"><x:out select="$finance/fax_bussiness" /></div>
					<div class="td_item" align="center" id="td_item_${index}_7"><x:out select="$finance/fax_income" /></div>
					<div class="td_item" align="center" id="td_item_${index}_8"><x:out select="$finance/fax_personal" /></div>
					<div class="td_item" align="center" id="td_item_${index}_9"><x:out select="$finance/fax_other" /></div>
					<div class="td_item" align="center" id="td_item_${index}_10"><x:out select="$finance/assets" /></div>
					<div class="td_item" align="center" id="td_item_${index}_11"><x:out select="$finance/assets_fixed" /></div>
					<div class="td_item" align="center" id="td_item_${index}_12"><x:out select="$finance/liabilities" /></div>
					<div class="td_item" align="center" id="td_item_${index}_13"><x:out select="$finance/liabilities_pre" /></div>
					<div class="td_item" align="center" id="td_item_${index}_14"><x:out select="$finance/caseflow" /></div>
					<div class="td_item" align="center" id="td_item_${index}_15"><x:out select="$finance/caseflow_active" /></div>
				</td>
			</c:if>

			</x:forEach>
		</tr>
</table>
	
	
<script type="text/javascript">
	$(function() {
		

		$("#finance_enterprise").children("td:not(:first)").each(function(){
			setFinanceStyle($(this));
		});
		
		
		
		
	});
	
	
	
	/*
	 * 设置财务样式
	 */
	 function setFinanceStyle(obj) {
		obj.css("padding", "0").children("div:odd").css("background", "#f1f1f1");
		obj.find("input").css("width", 120).css("margin-top", "3px").css("height", "18px");
		obj.find("span").attr("style", "width: 95%; text-align: center; display: block;");
	 }
	
</script>

